package com.xuhai.blog.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xuhai.blog.admin.entity.CommentEntity;
import com.xuhai.blog.admin.mapper.CommentMapper;
import com.xuhai.blog.admin.service.CommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 评论表 服务实现类
 * </p>
 *
 * @author 机蜂
 * @since 2022-02-08
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, CommentEntity> implements CommentService {

    @Override
    public void deleteByArticleId(Integer articleId) {
        this.remove(new QueryWrapper<CommentEntity>().eq("article_id",articleId));
    }
}
